#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Core;
using Cephei.Core.Generic;
using Microsoft.FSharp.Core;
using Cephei.QL.Indexes;
using Cephei.QL.Times;
using Cephei.QL.Termstructures;
namespace Cephei.QL.Cashflows
{
    /// <summary> 
	/// ! The performance is relative to the index value on the base date.  The other inflation value is taken from the refPeriodEnd date with observation lag, so any roll/calendar etc. will be built in by the caller.  By default this is done in the InflationCoupon which uses ModifiedPreceding with fixing days assumed positive meaning earlier, i.e. always stay in same month (relative to referencePeriodEnd).  This is more sophisticated than an %IndexedCashFlow because it does date calculations itself.  \todo we do not do any convexity adjustment for lags different to the natural ZCIIS lag that was used to create the forward inflation curve.
	/// </summary>
    [Guid ("0AD5B2BC-3FEA-4e92-BDE8-70971ADF08D0"),ComVisible(true)]
	public interface ICPICoupon : Cephei.QL.Cashflows.IInflationCoupon
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        /// <summary> 
		/// 
		/// </summary>
		 Double AdjustedFixing {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double BaseCPI {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Indexes.IZeroInflationIndex CpiIndex {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double FixedRate {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double IndexFixing {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double IndexObservation(DateTime onDate);
        /// <summary> 
		/// 
		/// </summary>
		 QL.Cashflows.CPI.InterpolationTypeEnum ObservationInterpolation {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double Spread {get;}
    }   

    /// <summary> 
	/// ! The performance is relative to the index value on the base date.  The other inflation value is taken from the refPeriodEnd date with observation lag, so any roll/calendar etc. will be built in by the caller.  By default this is done in the InflationCoupon which uses ModifiedPreceding with fixing days assumed positive meaning earlier, i.e. always stay in same month (relative to referencePeriodEnd).  This is more sophisticated than an %IndexedCashFlow because it does date calculations itself.  \todo we do not do any convexity adjustment for lags different to the natural ZCIIS lag that was used to create the forward inflation curve. Factory
	/// </summary>
   	[ComVisible(true)]
    public interface ICPICoupon_Factory 
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        /// <summary> 
		/// 
		/// </summary>
	    ICPICoupon Create (Double baseCPI, DateTime paymentDate, Double nominal, DateTime startDate, DateTime endDate, UInt32 fixingDays, Cephei.QL.Indexes.IZeroInflationIndex index, Cephei.QL.Times.IPeriod observationLag, QL.Cashflows.CPI.InterpolationTypeEnum observationInterpolation, Cephei.QL.Times.IDayCounter dayCounter, Double fixedRate, Microsoft.FSharp.Core.FSharpOption<Double> spread, Microsoft.FSharp.Core.FSharpOption<DateTime> refPeriodStart, Microsoft.FSharp.Core.FSharpOption<DateTime> refPeriodEnd, Cephei.QL.Cashflows.IInflationCouponPricer QL_Pricer);
    }
}

